package com.kusiri.kframework.component
{
	import com.kusiri.kframework.KfContext;
	
	import mx.core.UIComponent;

	/**
	 * A basic (abstract) implementation to extend
	 */
	public class KfComponent implements IKfComponent
	{
		public function KfComponent()
		{
		}
		
		private var _name : String;
		
		/**
		 * A user definable name for the component, e.g. "My Table"
		 */
		public function get name() : String
		{
			return _name;
		}
		
		/**
		 * A user definable name for the component, e.g. "My Table"
		 */
		public function set name( name : String) : void
		{
			_name = name;
		}
		
		private var _generatorId : String;
		
		/**
		 * Gets the identifier for this singleton or generating factory
		 */
		public function get __generatorId() : String
		{
			return _generatorId;
		}
		
		/**
		 * Gets the identifier for this singleton or generating factory
		 */
		public function set __generatorId(generatorId : String) : void
		{
			_generatorId = generatorId;
		}
		
		private var _module : KfContext;
		
		/**
		 * Gets the spawning module
		 */
		public function get __context() : KfContext
		{
			return _module;
		}
		
		/**
		 * Sets the spawning module
		 */
		public function set __context(module : KfContext) : void
		{
			_module = module;
		}
		
		/**
		 * Tell the UI Component to load its data.
		 */
		public function __initializeComponent(onSuccess : Function, onFail : Function) : void
		{
			
		}
		
		
	}
}